package com.xdcplus.web.common.enums;

public enum WipTargetConditionEnum {
    LT("LT", "小于"),
    GT("GT", "大于"),
    ;

    private String code;

    private String msg;

    public static String getMsg(String code) {
        for (WipTargetConditionEnum ele : values()) {
            if (ele.getCode().equals(code)) {
                return ele.getMsg();
            }
        }
        return null;
    }

    WipTargetConditionEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static WipTargetConditionEnum byMsg(String msg) {
        for (WipTargetConditionEnum value : WipTargetConditionEnum.values()) {
            if (value.getMsg().equals(msg)) {
                return value;
            }
        }
        return WipTargetConditionEnum.GT;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
